<template>
  <div class="app-container">

      <el-card class="box-card">
        <div class="left">
      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">


        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="手牌" prop="name" >
              <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="1.2">
            <el-button type="primary" plain>F1读牌</el-button>

          </el-col>

          <el-col :span="1">
            <el-checkbox-group v-model="ruleForm.type">
              <el-checkbox label="无浴资" name="type"></el-checkbox>
              <el-checkbox label="E儿童" name="type"></el-checkbox>
            </el-checkbox-group>

          </el-col>

        </el-row>

        <el-row :gutter="10">
          <el-col :span="12">
        <el-form-item label="票号" prop="region">
          <el-input v-model="ruleForm.name"></el-input>
        </el-form-item>
          </el-col>

        </el-row>


        <el-row :gutter="10">
        <el-col :span="12">
            <el-form-item label="特殊备注" prop="region" >
              <el-select v-model="ruleForm.region" placeholder="特殊备注" style="width:100%">
                <el-option label="无" value="shanghai"></el-option>
                <el-option label="有" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="10">
          <el-col :span="15">
            <el-form-item  prop="name" >
              <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字" style="width:190px">

              </el-input-number>
            </el-form-item>
          </el-col>

          <el-col :span="5">
            <el-checkbox-group v-model="ruleForm.type">
              <el-checkbox v-model="checked">最低消费</el-checkbox>
            </el-checkbox-group>

          </el-col>

        </el-row>



        <el-form-item label="" prop="type">
          <el-checkbox-group v-model="ruleForm.type">
            <el-checkbox label="o备品2" name="type"></el-checkbox>
            <el-checkbox label="z备品" name="type"></el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <el-divider direction="vertical"></el-divider>

      </el-form>
        </div>

        <div class="middle">
          <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">


            <el-row>
              <el-col :span="10">
                <el-form-item label="主牌" label-width="20%" prop="userName">
                  <el-input v-model="ruleForm.name" placeholder="请输入主牌" style="width:90%;float:left"/>
                </el-form-item>
              </el-col>
                <el-col :span="9">
                  <el-form-item label="套票" label-width="20%" prop="userName">
                    <el-select v-model="ruleForm.region" placeholder="是否有套票" style="width:100%">
                      <el-option label="无" value="shanghai"></el-option>
                      <el-option label="有" value="beijing"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
            </el-row>
            <el-row :gutter="10">

              <el-col :span="19">
                <el-form-item label="同来" label-width="10%" prop="region">
                  <el-input
                    type="textarea"
                    :rows="2"
                    placeholder="请输入内容"
                    v-model="ruleForm.name">
                  </el-input>
                </el-form-item>

              </el-col>
            </el-row>


            <el-row :gutter="10">

                  <el-button plain>T团体牌</el-button>

              <el-col :span="15">
                <el-form-item  prop="name" label-width="12%">
                  <el-input v-model="ruleForm.name"></el-input>
                </el-form-item>
              </el-col>
            </el-row>


            <el-row :gutter="10">

                <el-button plain>T团体牌</el-button>

              <el-col :span="15">
                <el-form-item  prop="name" label-width="12%">
                  <el-input v-model="ruleForm.name"></el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="10">

                <el-button plain>T团体牌</el-button>

              <el-col :span="15">
                <el-form-item  prop="name" label-width="12%">
                  <el-input v-model="ruleForm.name"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="10">

              <el-button plain>T团体牌</el-button>

              <el-col :span="15">
                <el-form-item  prop="name" label-width="12%">
                  <el-input v-model="ruleForm.name"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </div>
        <div class="right">
          <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">


            <div class="right-title">
                 <p>最后一次交易时间:</p>
            </div>
                <p>会员信息</p>
                <p>会员姓名</p>
                <p>会员级别</p>
                <p>会籍顾问</p>
                <p>会员生日</p>
                <p>使用日期</p>
                <p>电话号码</p>
                <p>验证码</p>


            <el-form-item>
              <el-button type="primary" @click="submitForm('ruleForm')">验证会员</el-button>
              <el-button @click="resetForm('ruleForm')">登记指纹</el-button>

            </el-form-item>
          </el-form>
        </div>
      </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      ruleForm: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      },
      num: 1,
      checked: true,
      textarea: ''
    };
  },
  methods: {
    handleChange(value) {
      console.log(value);
    },
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          alert('submit!');
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
    }
  }
}
</script>

<style scoped>
.left{
  width: 33%;
  margin-top:20px;
  display:inline-block;
  float: left;
  position: relative;

}
.right{
  width: 33%;
  float: right;
  display:inline-block;
}
.middle {
  width: 33%;
  margin-top:20px;
  display:inline-block;


}

</style>
